<!-- 问题不能直接设置0.5px -->
因为0.5px的边框在不同浏览器的效果是不同的，有的浏览器会自动转换成1px的宽度

<!-- border+border-image+linear-gradient实现 -->
<!-- <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  .border {
    width: 200px;
    height: 200px;
    background-color: red;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(to bottom, transparent 50%, green 50%) 0 0 100% 0;
  }
</style>
<body>
  <div class="border"></div>
</body>
</html> -->

<!-- 伪元素+background-image -->
<!-- <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  .border {
    width: 200px;
    height: 200px;
    background-color: red;
    position: relative;
  }

  .border::before{
    content: " ";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-image: linear-gradient(to bottom, transparent 50%, blue 50%);
  }

</style>
<body>
  <div class="border"></div>
</body>
</html> -->

<!-- 定位+伪元素+transform缩放（scale) -->

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  .border {
    width: 200px;
    height: 200px;
    background-color: red;
    position: relative;
  }

  .border::before{
    content: " ";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: blue;
    transform: scaleY(0.5);
  }

</style>
<body>
  <div class="border"></div>
</body>
</html>